// api/expense.js
import request from '@/utils/request';

// 提交报销申请
export const submitExpenseService = (data) => {
  return request.post('/user/expense/submit', data);
};

// 获取报销历史记录
export const getExpenseHistoryService = (currentPage) => {
  return request.get(`/user/expense/history?currentPage=${currentPage}`);
};

// 撤销报销申请
export const cancelExpenseService = (expenseId) => {
  return request.post('/user/expense/cancel', null, {
    params: {
      expenseId: expenseId
    }
  });
}
// 文件上传接口
export const uploadFileService = (formData) => {
  return request.post('/upload', formData, {
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  });
};